# 计算0-100中偶数之和
i = 1
result= 0
while i <= 100:
    if i % 2 == 0:  # 偶数判断:除2余数为0
        result += i
    i += 1
print(result)

#另外一种计算方法
i = 0
result = 0
while i <= 100:
    result += i
    i += 2
print(result)